import ReactDOM from 'react-dom'

function closeGuide(guidType){
  if(guidType === "INCLUDE_MENU" && document.getElementById('guide-grid-container')){
    ReactDOM.unmountComponentAtNode(document.getElementById('menu-guide-helper'));
    document.getElementById('menu-guide-helper').style.display = 'none';
    document.getElementById('menu-guide').style.display = 'none';
    document.getElementById('menu-guide').removeChild(document.getElementById('guide-grid-container'));
  }else{
    if(document.getElementById('guide-grid-container')){
      ReactDOM.unmountComponentAtNode(document.getElementById('content-guide-helper'));
      document.getElementById('content-guide-helper').style.display = 'none';
      document.getElementById('content-guide').style.display = 'none';
      document.getElementById('content-guide').removeChild(document.getElementById('guide-grid-container'));
    }
  }
}

export default closeGuide
